document.querySelector('#btnChoose').addEventListener('click', function () {
    document.querySelector('#iptFile').click()
})
document.querySelector('#iptFile').addEventListener('change', async function () {
    console.log('up');
    const file = this.files[0]
    console.log(file);
    if (!file) {
        return
    }
    const fd = new FormData()
    fd.append('avatar', file)
    const { data: { data: { url } } } = await axios.post('http://ajax-api.itheima.net/api/file', fd)
    console.log(url)
    document.querySelector('.img-thumbnail').src = url
})